package com.xm.xmapp.fragment;

import android.os.Bundle;
import android.widget.TextView;

import com.xm.xmapp.MainActivity;
import com.xm.xmapp.R;
import com.xm.xmapp.app.MyAppcation;
import com.xm.xmapp.app.Type;
import com.xm.xmapp.base.BaseFragment;
import com.xm.xmapp.myinterface.MainActivityInterFace;
import com.xm.xmapp.response.bean.CustomHeightBean;

public class NoCarInfoFragment extends BaseFragment {

	private TextView address;
	private String addressname;

	public void setData(String addressname) {
		this.addressname = addressname;
	}

	public NoCarInfoFragment() {
	}

	public static NoCarInfoFragment newInstance(String addressname) {
		NoCarInfoFragment newFragment = new NoCarInfoFragment();
		newFragment.setArguments(new Bundle());
		newFragment.setData(addressname);
		return newFragment;
	}

	@Override
	public int setContentView() {
		return R.layout.fragment_no_carinfo;
	}

	@Override
	public void ViewTreeObserver() {
	
		super.ViewTreeObserver();
		CustomHeightBean bean = new CustomHeightBean();
		bean.ExitOffset = view.getHeight();
		bean.MaxOffset = view.getHeight();
		bean.flag = MainActivityInterFace.INTT_STATUS;
		MyAppcation.getMyAppcation().notifyDataSetChanged(MainActivity.class,
				Type.A_Main.CHANGE_UI_CODE, bean);

	}

	@Override
	public void initView() {
		address = (TextView) findViewById(R.id.address);
	}

	@Override
	public void initData() {
		address.setText(addressname);
	}

	@Override
	public void initEvent() {
	}

}
